{include file='pub/header'/}
<title>基础统计</title>
</head>
<body>
<nav class="breadcrumb">{$breadNav} <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
                                       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <form action="" method="get">
        <div class="text-c">
            日期：
            <input type="text" value="{$param.start_time || default=''}" onfocus="WdatePicker({maxDate:'#F{ $dp.$D(\'datemax\')}'})" id="datemin" name="start_time" autocomplete="off"
                   class="input-text Wdate" style="width:120px;">
            -
            <input type="text" value="{$param.end_time || default=''}" onfocus="WdatePicker({minDate:'#F{ $dp.$D(\'datemin\')}'})" id="datemax" name="end_time" autocomplete="off"
                   class="input-text Wdate" style="width:120px;">
            <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 查询
            </button>
            <button type="button" class="btn btn-success export-btn"><i class="Hui-iconfont Hui-iconfont-down"></i> 下载
            </button>
        </div>
    </form>
    <table class="table table-border table-bordered table-bg table-sort">
        <thead>
        <tr>
            <th scope="col" colspan="9">联系客服统计</th>
        </tr>
        <tr class="text-c">
            <th width="50">用户ID</th>
            <th width="50">用户名</th>
            <th width="50">手机号</th>
            <th width="50">联系客服时间</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $v}
        <tr class="text-c">
            <td>{$v.user_id}</td>
            <td>{$v.user_name}</td>
            <td>{$v.telephone}</td>
            <td>{$v.create_time}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {$list->render()}
</div>
{include file="pub/footer"/}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
    // $('.table-sort').dataTable({
    //     "aaSorting": [[0, "desc"]],//默认第几个排序
    // });
    $(function () {
        $(".export-btn").click(function () {
            var data = $("form").serialize();
            var myWin = window.open("{:url('kefuDown')}?"+data);
            myWin.onload = function () {
                myWin.close();
            }
        });
    })
</script>
</body>
</html>